import React, { Component } from 'react'

import CompA from './CompA'
import CompB from './CompB'

export default class Liftup extends Component {
  state = {
    msg: ''
  }

  handleReceiveMessage(msg) {
    this.setState({
      msg
    })
  }

  render() {
    return (
      <div>
        <CompA onReceiveMessage={this.handleReceiveMessage.bind(this)}></CompA>
        <CompB message={this.state.msg}></CompB>
      </div>
    )
  }
}
